﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserManager.aspx.cs" Inherits="GovernmentOfficeProject.LevelViewUI.admin.UserManager" MaintainScrollPositionOnPostback="true"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
   <!--让gridview列宽不变  <style>table{table-layout:fixed}</style> -->

    <style type="text/css">
        #divUserAddandSelect
        {
            width: 757px;
        }
        #divTestShow
        {
            width: 321px;
            height: 61px;
        }
    </style>

</head>
<body>
    <form id="formUserManager" runat="server">
        
        <div style="font-family: 宋体; font-size: x-small; width: 762px;">
            <div ID="divUserAddandSelect" runat="server">
                <asp:Label ID="Label5" runat="server" Text="搜索条件:" Height="18px"></asp:Label>
                <asp:Label ID="Label2" runat="server" Text="帐号-" Height="18px"></asp:Label>
                <asp:TextBox ID="txtUserName" runat="server" Height="18px" 
                    style="margin-top: 0px" Width="86px"></asp:TextBox>
                &nbsp;<asp:Label ID="Label3" runat="server" Text="姓名-" Height="18px"></asp:Label>
                <asp:TextBox ID="txtRealName" runat="server" Font-Size="Small" Height="18px" 
                    style="margin-top: 0px" Width="86px"></asp:TextBox>
                &nbsp;<asp:Label ID="Label4" runat="server" Text="状态-" Height="18px"></asp:Label>
                <asp:DropDownList ID="ddlUserStatus" runat="server" Font-Size="Small" 
                    Height="20px" Width="51px" 
                    onselectedindexchanged="ddlUserStatus_SelectedIndexChanged">
                    <asp:ListItem Value="1">启用</asp:ListItem>
                    <asp:ListItem Value="0">禁用</asp:ListItem>
                </asp:DropDownList>
                &nbsp;<asp:Button ID="btnSelect" runat="server" Text=" 搜 索 " Width="76px" 
                    Font-Names="黑体" Font-Size="Small" Height="20px" onclick="btnSelect_Click" />
            &nbsp;
                <asp:Button ID="btnAllUser" runat="server" Text="所有用户" Width="76px" 
                    Font-Names="黑体" Font-Size="Small" Height="20px" onclick="btnAllUser_Click" />
            &nbsp;
                <asp:Button ID="btnAddUser" runat="server" Height="20px" Text="新增用户" 
                    Width="92px" Font-Names="黑体" Font-Size="Small" 
                    onclick="btnAddUser_Click" />
            </div>
    <asp:GridView ID="GridViewUserManager" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" CellPadding="3"             
            Font-Size="Small" ForeColor="#333333" 
            DataKeyNames="UserID" Width="754px" 
                CellSpacing="3" 
                onpageindexchanging="GridViewUserManager_PageIndexChanging" 
                onrowdeleting="GridViewUserManager_RowDeleting" 
                onpageindexchanged="GridViewUserManager_PageIndexChanged">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="UserID" HeaderText="用户编码" 
                SortExpression="UserID" >            
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="LoginName" HeaderText="登录帐号" 
                SortExpression="LoginName" >
            <HeaderStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="RealName" HeaderText="真实姓名" 
                SortExpression="RealName" >
            <HeaderStyle Width="150px" />
            </asp:BoundField>
            <asp:BoundField DataField="MobilePhone" HeaderText="移动电话" 
                SortExpression="MobilePhone" >
            <HeaderStyle Width="100px" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="用户状态" SortExpression="RecordStatus">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RecordStatus") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:DropDownList ID="DDLStateOperation" runat="server" AutoPostBack="True" 
                        BackColor="#3399FF" ondatabound="DDLStateOperation_DataBound" 
                        onselectedindexchanged="DDLStateOperation_SelectedIndexChanged" 
                        SelectedValue='<%# ((Eval("RecordStatus").ToString()=="0")?"禁用":"启用") %>' 
                        style="font-weight: 700">
                        <asp:ListItem>启用</asp:ListItem>
                        <asp:ListItem>禁用</asp:ListItem>
                    </asp:DropDownList>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False" HeaderText="操作区">
                <ItemTemplate>
                    <asp:Button ID="ButtonUserDel" runat="server" CausesValidation="False"                         
                       CommandArgument='<%# Eval("UserID")%>' 
                        onclientclick="javascript:return confirm('確定刪除该用户吗？')" 
                        Text="删除" Font-Size="Small" Width="55px" onclick="ButtonUserDel_Click" 
                        Height="23px" Enabled="False">
                        </asp:Button>
                    &nbsp;<asp:Button ID="ButtonUserDetail" runat="server" CausesValidation="False" 
                         CommandArgument='<%# Eval("UserID")%>' 
                        Font-Size="Small" Text="查看" Width="55px" 
                        onclick="ButtonUserDetail_Click" Height="23px" >
                        </asp:Button>
                </ItemTemplate>
                <HeaderStyle Width="130px" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" VerticalAlign="Bottom" 
            HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
            <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True" 
                Font-Size="X-Small" Height="16px" 
                onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
                <asp:ListItem Value="8">每页显示数量</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
            </asp:DropDownList>
            <asp:Label ID="lblOperationFeedback" runat="server" BorderColor="#0066FF" 
                Font-Size="Small" ForeColor="#FF3300" Height="18px" Text="操作状态:" 
                Width="538px"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
            </div>
        <br />
    </form>
    </body>
</html>
